<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="axios-0.18.0.js"></script>
</head>
<body>
<input type="button" value="获取数据GET" ONCLICK="get()">
<input type="button" value="删除数据post    " ONCLICK="post()">
<script>
    function get(){
        // axios({
        //     method:"get",
        //     url:"data.json"
        // }).then(result=>{
        //     console.log(result.data)
        // })
        axios.get("data.json").then(result=>{
            console.log(result.data)
        })
    }
    function post(){
        // axios({
        //    method:"post",
        //    url: "http://yapi.smart-xwork.cn/mock/169327/emp/deleteById",
        //     data:"id=1"
        // }).then(result=>{
        //     console.log(result.data)
        // })
        axios.post("data.json").then(result=>{
            console.log(result.data)
        })
    }
</script>
</body>
</html>